<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<title>知文招标网 - 后台管理平台</title>
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<meta name="apple-mobile-web-app-status-bar-style" content="black"> 
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="format-detection" content="telephone=no" />
<link rel="short icon" href="../../front/images/28.jpg">
<link rel="stylesheet" href="../css/layui.css" media="all">
</head>
<body class="layui-layout-body">
<div class="layui-layout layui-layout-admin">
	<div class="layui-header">
		<div class="layui-logo"><a href="index.html;" style="color:green">管理员</a></div>
    		<!-- 头部区域（可配合layui已有的水平导航） -->
<!--		<ul class="layui-nav layui-layout-left">-->
<!--			<li class="layui-nav-item"><a href="javascript:tabchange('welcome.html');">控制台</a></li>-->
<!--			&lt;!&ndash;  -->
<!--      		<li class="layui-nav-item"><a href="javascript:;">其它</a>-->
<!--       			<dl class="layui-nav-child">-->
<!--        			<dd><a href="javascript:tabchange('welcome.html');">邮件管理</a></dd>-->
<!--         			<dd><a href="javascript:tabchange('welcome.html');">消息管理</a></dd>-->
<!--         			<dd><a href="javascript:tabchange('welcome.html');">授权管理</a></dd>-->
<!--       			</dl>-->
<!--			</li>&ndash;&gt;-->
<!-- 		</ul>-->
    	<ul class="layui-nav layui-layout-right">
      		<li class="layui-nav-item">
        		<a href="javascript:;"><span id="adminName">管理员</span></a>
                <dl class="layui-nav-child">
                	<dd><a href="javascript:tabchange('pwd.html');">修改密码</a></dd>
                </dl>
      		</li>
     		 <li class="layui-nav-item"><a href="javascript:void(0)" onclick="loginout()">退了</a></li>
		</ul>
	</div>
  
	<div class="layui-side layui-bg-black">
		<div class="layui-side-scroll">
      		<!-- 左侧导航区域（可配合layui已有的垂直导航） -->
      		<ul class="layui-nav layui-nav-tree" lay-filter="test">
				<li class="layui-nav-item layui-nav-itemed">
					<a href="javascript:;">招标管理</a>
					<dl class="layui-nav-child">
						<dd><a href="javascript:tabchange('tenderAnnouncement.html');">招标公告</a></dd>
						<dd><a href="javascript:tabchange('winTenderManager.html');">中标公告</a></dd>
						<dd><a href="javascript:tabchange('otherTenderManager.html');">其他公告</a></dd>
						<dd><a href="javascript:tabchange('add.html');">发布公告</a></dd>
					</dl>
				</li>
				<li class="layui-nav-item">
					<a href="javascript:;">法律法规管理</a>
					<dl class="layui-nav-child">
						<dd><a href="javascript:tabchange('addLaws.html');">法律法规发布</a></dd>
						<dd><a href="javascript:tabchange('lawsManager.html');">法律法规管理</a></dd>
					</dl>
				</li>
				<li class="layui-nav-item">
					<a href="javascript:;">模板管理</a>
					<dl class="layui-nav-child">
						<dd><a href="javascript:tabchange('templateManager.html');">模板管理</a></dd>
						<dd><a href="javascript:tabchange('templateAdd.html');">新增模板</a></dd>
					</dl>
				</li>
<!--        		<li class="layui-nav-item layui-nav-itemed">-->
<!--          			<a class="" href="javascript:;">用户管理</a>-->
<!--          			<dl class="layui-nav-child">-->
<!--            			<dd><a href="javascript:tabchange('user.html');">用户</a></dd>-->
<!--          			</dl>-->
<!--        		</li>-->
       		 	<li class="layui-nav-item"><a href="javascript:void(0)" onclick="loginout()">退出系统</a></li>
			</ul>
		</div>
	</div>
  
	<div class="layui-body">
    	<iframe src="welcome.html?from=demo" frameborder="0" id="demoAdmin" style="width: 100%; height: 99%;"></iframe>           
	</div>
  
	<div class="layui-footer">
    	<p style="text-align:center"><a href="javascript:void(0)"  class="copy">湖南省岳阳市知文招标有限公司</a> &copy; 版权所有</p>
	</div>
</div>
<script src="../js/layui.all.js" charset="utf-8"></script>
<script src="../js/vue.js" charset="utf-8"></script>
<script src="../js/jquery-3.4.1.min.js" charset="utf-8"></script>
<script src="../js/show-dialog.js" charset="utf-8"></script>
<script src="../js/checkLogin.js" charset="utf-8"></script>
<script src="../js/websocket.js" charset="utf-8"></script>
<script src="../js/stringCheckNull.js" charset="utf-8"></script>
<script>
function tabchange(page) {
	document.getElementById("demoAdmin").setAttribute("src", page);
}

let webSocket;

$(function(){
	let userName = localStorage.getItem("userName")
	if(!isEmpty(userName)){
		$("#adminName").text(userName);
	}
	
	// 发送请求看是否登录
	/*
	$.get("/admin/check",null,rt=>{
		if(rt.code == 200){
			//说明登陆了
			$("#adminName").text(rt.data.aname);
			
			//连接websocket服务器
			webSocket = openWebSocket(rt.data.ano);
			webSocket.onmessage = function(msg){  // 接受信息的方法
				if(msg.data == "101"){  // 说明是挤退信息 账号在其他地方登录
					alert("对不起,您的帐号已在其他地方登录,若非本人登录,请修改密码...");
					location.href="/admin/loginout";
					return;
				}
			}
			return;
		}
		showmsg("请先登录...","red",function(){location.href="/back/login.html"})
	},"json")*/
})

function loginout(){
	localStorage.removeItem("userId")
	localStorage.removeItem("userName")
	// $.get("/user/loginOut",null,rt=>{
	// 	location.href = "http://127.0.0.1:19988" + rt
	// })
	location.href="/user/loginOut";
}

</script>
</body>
</html>
